<style type="text/css">


</style>
<link rel="stylesheet" href="../Public/css/quanju.css" type="text/css" media="all">
<script type="text/javascript" src="../Public/js/jquery.SuperSlide.2.1.1.js"></script>



<div style="width:100%;height:auto;background:#EEE;min-height:300px;">
  <div class="wind_xgtny">
    <div class="subnav">
    <ul class="crumbs">
        <li>我的位置：</li>
        <li><a href="{$site_url}">{$site_name} </a> </li>
        <li><a href="{$Categorys[$catid]['url']}">&nbsp; &gt; {$Categorys[$catid]['catname']} </a></li>
        <li>&nbsp; &gt; {$title} </li>
        <div class="clear"></div>
    </ul>
 
</div>

    
    <div class="wind_xgtny_content">
          <!-- 相册部分 -->
                    <!-- 相册部分 -->
<div id="play">
  <ul class="img_ul">
  
   {php foreach($pics as $k=>$r):}
                <li {if $k==0}style="display:block;"{/if}><a class="img_a"><img src="{$r['filepath']}"/></a></li>
    {php endforeach;}
  </ul>  
  <a href="javascript:void(0)" class="prev_a change_a" title="上一张"> <span></span></a>
  <a href="javascript:void(0)" class="next_a change_a" title="下一张"> <span style="display: inline; "></span> </a>
  </div>
  
   <div class="wind_xgtny_content2" style="top:0;right:0;">
              <div style="width:82%;margin:auto;height:auto;">
                <span style="font-size:20px;display:block;font-weight:bold;line-height:40px;" class="title_aa">{$title}</span>
                <p style="color:#A7A7A7;line-height:20px;">
                 {$describe|str_cut=###,35}
                </p>
                <div class="wind_xgtny_contentUL2s">
                  <span style="margin-left:28px;">
                         <YP:list name="Label" where="genre=17" id="v" limit="50">
                          <?php echo $itemType == $v['id'] ? $v['title'] : ''; ?>
                         </YP:list></span>
                  <span style="float:right;width:58px;white-space: nowrap; "><?php echo  $budget?>万元</span>
                  <div style="clear:both;"></div>
                  <span style="margin-left:28px;">
                         <YP:list name="Label" where="genre=21" id="v" limit="50">
                             <?php echo $style == $v['id'] ? $v['title'] : ''; ?>
                         </YP:list></span>
                  <span style="float:right;width:58px;">{$itemArea}㎡</span>
                  <div style="clear:both;"></div>
                </div>
                <div class="wind_xgtny_contentUL2">
                  <p>
                    <span style="font-size: 14px;font-weight: bold;color:#333;">设计理念：</span>
                     {$content|str_cut=###,220}
                  </p> 
                  <div class="all" style="display:none">{$content}</div>
                  {if strlen($content)>400 }<p><a href="javascript:contentall()">查看全部</a></p>{/if}
                </div>
 <style>
  .t_all{font-family: '微软雅黑'; font-size:14px;line-height:1.5;text-indent:2em;  }
  .ten{ width:380px; margin:0 auto}
  </style>
<script type="text/javascript">
 function contentall(){
	 var content=$(".all").html();
	 
	layer.open({
	  type: 1,
	  title :'查看全部',
	  skin: 'layui-layer-rim', //加上边框
	  area: ['420px', '340px'], //宽高
	  content: '<div class="t_all"> <div class="ten"> <p>'+content+'</p></div></div>'
	});
 }
  </script>        
              </div>
            </div>
  
  
  
 
<script>
	var iy=0; //图片标识
var img_num=$(".img_ul").children("li").length; //图片个数
$(".img_ul li").hide(); //初始化图片	
play();
$(function(){
	 $(".img_hd ul").css("width",($(".img_hd ul li").outerWidth(true))*img_num); //设置ul的长度
	
	 
	 $(".bottom_a").css("opacity",0.7);	 //初始化底部a透明度
	 //$("#play").css("height",$("#play .img_ul").height());
	 if (!window.XMLHttpRequest) { //对ie6设置a的位置
	 $(".change_a").css("height",$(".change_a").parent().height());}
	 $(".change_a").focus( function() { this.blur(); } );
	 $(".bottom_a").hover(function(){ //底部a经过事件
		 $(this).css("opacity",1);	
		 },function(){
		$(this).css("opacity",0.7);	 
			 });
	 $(".change_a").hover(function(){ //箭头显示事件
		 $(this).children("span").show();
		 },function(){
		 $(this).children("span").hide();
			 });
	 $(".img_hd ul li").click(function(){
		 iy=$(this).index();
		 
		 play();
		 });
	 $(".prev_a").click(function(){
		 //i+=img_num;
		 var nn=iy
		 iy--;
		 //i=i%img_num;
		  
		 iy=(iy<0?0:iy);
		 if(nn==0){
			iy= img_num-1;
			 }
			 
		 play();
		 }); 
	 $(".next_a").click(function(){
		 iy++;
		 //i=i%img_num;
		 var nn=iy
		 iy=(iy>(img_num-1)?(img_num-1):iy);
		 if(img_num==nn){
			 iy=0;
			 }
			 //alert(iy)
		 play();
		 }); 
	 }); 
	 
function play(){ //动画移动	
	var img=new Image(); //图片预加载
	img.onload=function(){img_load(img,$(".img_ul").children("li").eq(iy).find("img"))};
	img.src=$(".img_ul").children("li").eq(iy).find("img").attr("src");
	//$(".img_ul").children("li").eq(i).find("img").(img_load($(".img_ul").children("li").eq(i).find("img")));
	
	$(".img_hd ul").children("li").eq(iy).addClass("on").siblings().removeClass("on");
	if(img_num>4){ //大于5个的时候进行移动
		if(iy<img_num-2){  //前2个
		$(".img_hd ul").animate({"marginLeft":(-($(".img_hd ul li").outerWidth()+3)*(iy-2<0?0:(iy-2)))});
		}
		else if(iy>=img_num-2){ //后2个
			$(".img_hd ul").animate({"marginLeft":(-($(".img_hd ul li").outerWidth()+3)*(img_num-4))});
			//alert(-($(".img_hd ul li").outerWidth()+3)*(img_num-7));
			}
	}
	if (!window.XMLHttpRequest) { //对ie6设置a的位置
	$(".change_a").css("height",$(".change_a").parent().height());}
	}
function img_load(img_id,now_imgid){ //大图片加载设置 （img_id 新建的img,now_imgid当前图片）
    
    if(img_id.width/img_id.height>1)
	{
		if(img_id.width >=$("#play").width()) $(now_imgid).width($("#play").width());
		   if(img_id.height<500) {
			  var top=(500-img_id.height)/2;
			$(now_imgid).css("margin-top",top+'px');
			}
		}
	else {
		if(img_id.height>=500) $(now_imgid).height(500);
		  if(img_id.height<500) {
			  var top=(500-img_id.height)/2;
			$(now_imgid).css("margin-top",top+'px');
			}
		
		}
		$(".img_ul").children("li").eq(iy).show().siblings("li").hide(); //大小确定后进行显示
	}
function imgs_load(img_id){ 
	if(img_id.width >=$(".img_hd ul li").width()){ 
	   img_id.width = 250;
	};
	//if(img_id.height>=$(".img_hd ul li").height()) {img_id.height=$(".img_hd ul li").height();}
	}
	
</script>  
  
<div class="img_hd">
  <ul class=" clearfix" id="thumbs">
    {php foreach($pics as $k=>$r):}
                <li><a class="img_a"><img src="{$r['filepath']}" id="imgs_{$k}" onload="imgs_load(this)"></a></li>
                
    {php endforeach;}
    
 </ul>
 
 
 
  <a class="bottom_a prev_a" style="opacity: 0.7; "></a> <a class="bottom_a next_a" style="opacity: 0.7; "></a> </div>
  


          
          
          
           <!-- <div id="gallery">
  <div id="imagearea" style="position:relative; ">
    <div id="image" style="background:#000000">
      <a href="javascript:imgNav(-1)" class="imgnav " id="previmg"></a>
      <a href="javascript:imgNav(1)" class="imgnav " id="nextimg"></a>
    </div>
    <div class="wind_xgtny_content2" style="top:0;right:0;">
              <div style="width:82%;margin:auto;height:auto;">
                <span style="font-size:20px;display:block;font-weight:bold;line-height:40px;" class="title_aa">{$title}</span>
                <p style="color:#A7A7A7;line-height:20px;">
                 {$describe|str_cut=###,35}
                </p>
                <div class="wind_xgtny_contentUL2s">
                  <span style="margin-left:28px;">
                         <YP:list name="Label" where="genre=17" id="v" limit="50">
                          <?php echo $itemType == $v['id'] ? $v['title'] : ''; ?>
                         </YP:list></span>
                  <span style="float:right;width:58px;"><?php echo  $budget?>万元</span>
                  <div style="clear:both;"></div>
                  <span style="margin-left:28px;">
                         <YP:list name="Label" where="genre=21" id="v" limit="50">
                             <?php echo $style == $v['id'] ? $v['title'] : ''; ?>
                         </YP:list></span>
                  <span style="float:right;width:58px;">{$itemArea}㎡</span>
                  <div style="clear:both;"></div>
                </div>
                <div class="wind_xgtny_contentUL2">
                  <p>
                    <span style="font-size: 14px;font-weight: bold;color:#333;">设计理念：</span>
                     {$content|str_cut=###,220}
                  </p> 
                  <div class="all" style="display:none">{$content}</div>
                  {if strlen($content)>400 }<p><a href="javascript:contentall()">查看全部</a></p>{/if}
                </div>
                
              </div>
            </div>
  </div>
  <style>
  .t_all{font-family: '微软雅黑'; font-size:14px;line-height:1.5;text-indent:2em;  }
  .ten{ width:380px; margin:0 auto}
  </style>
<script type="text/javascript">
 function contentall(){
	 var content=$(".all").html();
	 
	layer.open({
	  type: 1,
	  title :'查看全部',
	  skin: 'layui-layer-rim', //加上边框
	  area: ['420px', '340px'], //宽高
	  content: '<div class="t_all"> <div class="ten"> <p>'+content+'</p></div></div>'
	});
 }
  </script>
  <div id="thumbwrapper">
    <div id="thumbarea">
      <ul id="thumbs">
      <?php foreach($pics as $k=>$r){?>
                <li value="<?php echo $k?>" style="border:#999 solid 1px; width:260px;" name="<?php echo  $v['filepath'] ?>"><img id="img<?php echo $k ?>" src="<?php echo $r['filepath'] ?>" width="259" height="124" alt="" /></li>
            <?php } ?>
        
      </ul>
    </div>
  </div>
</div>
<script type="text/javascript" src="../Public/js/anli_show.js"></script>
<script type="text/javascript">
window.setTimeout(function(){slideShow();},100);

$(document).ready(function(){ 
　　$("#a").click(function(){ 
　　　　//adding your code here　　 
　　}); 
}); 
</script>

   

 <!-- end -->
        <ul class="wind_xgtnyUL1">
          <li><img src="../Public/images/wind_block1.png" />&nbsp;{$hits}</li>
          
          <li class="sign" style="border-top: 1px dashed #CDCDCD;">&nbsp;&nbsp;&nbsp;&nbsp;
 
    <div class="hm cl" style="float:left; margin-left:50px;">
   
    <div id="bdshare" class="bdshare_t bds_tools_24 get-codes-bdshare">
    <span  style="text-indent:0;padding-left: 32px; float:left;width: auto;font-size: 16px;font-family: '微软雅黑';">分享到 </span>
    <a class="bds_qzone" title="分享到QQ空间" href="#"></a>
    <a class="bds_tsina" title="分享到新浪微博" href="#"></a>
    <a class="bds_tqq" title="分享到腾讯微博" href="#"></a>
   
    <span class="bds_more" style="text-indent:0;padding-left: 32px;width: auto;font-size: 18px;font-family: '微软雅黑';"></span>
    </div>
    <script type="text/javascript" id="bdshare_js" data="type=tools" src="http://bdimg.share.baidu.com/static/js/bds_s_v2.js?cdnversion=406586"></script>
    
    
    </div>

</li>
          <li class="wind_public2">
          
          </li>
           <li style="margin-left:5px; float:left; font-size:16px "><a href="javascript:onclick=keep({$id})" >收藏：&nbsp;<img src="../Public/images/windimg24.png" /> </a>&nbsp;&nbsp;<span class="keep_n">{$keep_num}</span></li>
         </ul>
         
        <div style="clear:both;"></div>
        <ul class="wind_xgtnyUL2">
          {if  $_COOKIE['YP_username']}<a href="index.php?g=User&m=Index&a=eva_post&like=1&mm=Case&id={$id}">{else}<a href="index.php?g=User&m=Login&a=index">{/if}<li><img src="../Public/images/windimg11.png" /></li></a>
          {if  $_COOKIE['YP_username']}<a href="index.php?g=User&m=Index&a=eva_post&haet=1&mm=Case&id={$id}">{else}<a href="index.php?g=User&m=Login&a=index">{/if}<li><img src="../Public/images/windimg12.png" /></li></a>
          <li class="wind_xgtnyUL2li">
            <span><u>{$like_num}</u></span>
            <span style="margin-left: 29px;"><u>{$haet_num}</u></span>
          </li>
          
          
          
        </ul>
        
       <?php $user=M('User')->where('id='.$userid)->find();?>
        <div style="clear:both; height:100px;"><div class="altx"  style=" height:100px; width:350px; ">
                        <div class="tx1"><a href="index.php?m=User&a=index&id={$user.id}"><img width="80" class="yuan" height="80" style="border-radius: 100%;" src="<?php echo $user['avatar']?>"></a></div>
                       <div style=" float:left; margin-left:20px; line-height:3em"> 
                       <p style=" font-size:16px; font-weight:bold; color:#333333"><a href="index.php?m=User&a=index&id={$user.id}"><?php echo $username?></a>&nbsp;设计作品</p>
                       <p>发表于：&nbsp;&nbsp;{$createtime|remianday=###}</p>
                       <a href="index.php?g=user&m=Guestbookadd&a=add&designid=<?php echo $userid?>"><img class="yuan" src="../Public/images/alyy.gif"></a></div>
                  </div></div>
          
                    
       
        <div class="wind_border"></div>
<!--评论-->
<style type="text/css">
.wind_xgtnyUL3 .wind_header{
	behavior: url(../Public/PIE.htc);
	
	}
</style>
     <?php 
         $field='jg_comment.id,jg_comment.content,jg_comment.createtime,jg_user.id as userid,jg_user.avatar,jg_user.username';
         $where='jg_Comment.`conid`='.$id.' and contype="Case"';
         $reluts=M('Comment')->field($field)->where($where)->join('jg_user ON jg_comment.userid = jg_user.id')->limit('50')->select();
          foreach($reluts as $key=>$val){
    ?>
        <ul class="wind_xgtnyUL3">
          <li>
            <a href="index.php?m=User&a=index&id={$val['userid']}"><img class="wind_header" src="{$val['avatar']}" /></a>
          </li>
          <li>
            <ul class="wind_xgtnyUL4">
              <li style="width:100%;">
                <span style="font-size:18px;line-height:42px;"> <a href="index.php?m=User&a=index&id={$val['userid']}">{$val['username']}</a>&nbsp;&nbsp;</span>
                <span style="color:#999;">{$val.createtime|toDate=###,'Y-m-d H:i:s'}说：</span>
              </li>
                <p>{$val['content']}</p>
            </ul>
          </li>
          <div style="clear:both;"></div>
        </ul>
        <?php }?>
 <!--评论-->       
       
       <form name="myform" id="myform" action="{:URL('User-Index/comment_post')}" method="post" onSubmit="return logina();">
        <input type="hidden" name="conid" value="{$id}"/> 
        <input type="hidden" name="contype" value="Case"/>
        <input type="hidden"  name="catid" value="{$catid}" />
		<input type="hidden"  name="moduleid" value="{$moduleid}" />
		<input type="hidden"  name="lang" value="{$langid}" />
        <input type="hidden"  name="title" value="{$title}" />
        <input type="hidden"  name="url" value="<?php echo $_SERVER['REQUEST_URI'];?>" />
        <ul class="wind_xgtnyUL3" style="border:none;">
          <li>
            <img class="wind_header" src="../Public/images/windhead1.png" />
          </li>
          <li>
            <ul class="wind_xgtnyUL4">
              <li style="width:100%;">
                <textarea class="wind_textarea"  name="content" placeholder="添加评论~~"></textarea>
              </li>
            </ul>
          </li>
          <div style="clear:both;"></div>
           <input type="submit" value="添加评论" style="cursor: pointer" class="wind_xgtnyULpinl" />
        </ul>
       
    </div>
  </div>
</div>
<div style="clear:both;"></div>
<script type="text/javascript">
function  keep(id){
	
	
		  var module='Case';
		  
		  var url=window.location.search;
		  url='index.php'+url;
		  var title=$(".title_aa").html();
		 
     // alert(title);
		  //var userid=$("#keep_u").attr('name');
		 // alert(userid)
	
		  $.post(
				  'index.php?g=User&m=Index&a=keep', 
				  {'id':id,
				   'module':module,
				   'url':url,
				   'title':title,
				   'catid':1
				  },
				  function(res){
					 if(res.length>1000){
						alert('您还未登录，请您先登录');
						 } else{
							 alert(res);
							 if(res=='收藏成功!'){
							  var keepnum=parseInt($(".keep_n").html())+1;
							  $(".keep_n").html(keepnum);
							  }
						 }
					 
					});
	  
	}





</script>

<script>
window.setTimeout(function(){
	
	$("#thumbs img").each(function(){ 
　　　　//adding your code here\
        var id=$(this).attr('id');
		var url=$(this).attr('src');
		//alert(id);
        img_list(url,id);
		
       //alert($(this).attr('src'))　　 
　　}); 


},1000);


  function img_list(url,id){
	    var width=250;
		var height=130;
		var bili=width/height;
		
		        var img = new Image();
				img.src =url ;
				//alert(img.src)
				var w = img.width;
		        var h = img.height;
				var b=w/h;
				//alert(w)
				var top=0;
					if(height>h){
					 top=(height-h)/2;
					//alert(top)
					}  
					if(width>w){
					 left=(width-w)/2;
					//alert(top)
					}  
			   
					
		if(w<=width && h<=height){
						  $("#"+id).css("width",w+'px').css("height",h+'px').css("margin-top",top+'px').css("margin-left",left+'px');
						 
		}else if(w>width && h>height){ 
		
					if(b>bili){ 
					     var mar_top=0;
						     mar_top=250/b;
							 top=(height-mar_top)/2;
						 $("#"+id).css("width","250px").css("height",mar_top+"px").css("margin-top",top+'px');
						//alert(33) 
					}else{
						var mar_left=0;
						mar_left=130*b;
						left=(width-mar_left)/2;
						$("#"+id).css("width","auto").css("height","130px").css("margin-top",top+'px'); 
						//alert(left)	
					}
		}else if(w>width && h<height){ 
			 $("#"+id).css("width","250px;").css("height","auto").css("margin-top",top+'px').css("margin-left",left+'px'); 
		}else if(w<width && h>height){ 
		//alert(111)
		    var mar_left=0;
			
			    mar_left=130*b;
			    left4=(width-mar_left)/2;
				//alert(mar_left)
			$("#"+id).css("width","auto").css("height",'125px').css("margin-top",top+'px').css("margin-left",left4+'px'); 
		}
}


</script>                                                                                                                                                                                                                        